<script setup>
import { ref } from 'vue'
import HmForm from './components/HmForm.vue' // @不可用，.vue不能省
const h3Dom = ref(null)
const btnClick = () => {
  console.log(h3Dom.value)
}
//  调用hmForm组件内的方法
const hmFormCom = ref(null)
const btnClick2 = () => {
  hmFormCom.value.validate()
  console.log(hmFormCom.value)
}
</script>
<template>
  <div>
    <h3 ref="h3Dom">80期</h3>
    <button @click="btnClick">点击访问h3的dom</button>
    <hr />
    <HmForm ref="hmFormCom"></HmForm>
    <button @click="btnClick2">调用HmForm组件内的方法</button>
  </div>
</template>
<style></style>
